package com.xxg.renrensearch.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface RenrenShopGoodsSpecDao {
    /**
     * 根据商品ID列表删除记录
     *
     * @param ids ID列表
     */
    @Delete({"<script>",
            "delete from renren_shop_goods_spec where goods_id in ",
            "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
            "#{id}",
            "</foreach>",
            "</script>"})
    void deleteByIds(@Param("ids") List<Integer> ids);
}